<form class="form-vertical" name="scheduleConfigForm" novalidate>
    <div class="col-xs-12  col-sm-12">
        <h4 class="header smaller lighter blue">
            <span>
                <strong>编辑调度配置信息</strong>
            </span>
        </h4>
    </div>
    <div class="col-xs-12  col-sm-1"></div>
    <div class="col-xs-12">
        <div class="col-xs-12 form-group">

            <label class="col-sm-1 control-label padding0 textRight">任务名称</label>

            <div class="col-sm-3">
                <input type="text" class="width-80" ng-model="conf_taskName"
                       ng-change="checkTaskName()" ng-trim="true">
            </div>

            <label class="col-sm-1 control-label textRight">开发者</label>

            <div class="col-sm-3">
                <span class="block input-icon input-icon-right">
					<input type="text" placeholder="不限" ng-disabled="true"
                           class="width-80" ng-model="conf_developer">

			    </span>
            </div>

            <label class="col-sm-1 control-label padding0 textRight">执行频率</label>

            <div class="col-sm-3">
                <input type="text" class="width-80" name="freq" ng-model="conf_frequency">
                <!--<button class="help-button" tooltip-placement="top" tooltip="具体写法请点击" ng-click="frequencyHelp()">?-->
                <!--</button>-->
            </div>
        </div>


        <div class="col-xs-12 form-group">
            <label class="col-sm-1 control-label padding0 textRight">任务组</label>

            <div class="col-sm-3">
                <select name="taskGroup" class="width-80" ng-model="conf_taskGroup"
                        ng-options="group.ID as group.Text for group in taskGroupOptions">
                </select>
            </div>

            <label class="col-sm-1 control-label padding0 textRight">周期</label>

            <div class="col-sm-3">
                <select name="taskCycle" class="width-80" ng-model="conf_cycle" ng-change="cycleChanged()"
                        ng-options="k as v for (k,v) in cycleOptions">
                </select>
            </div>


            <label class="col-sm-1 control-label padding0 textRight">优先级</label>

            <div class="col-sm-3">
                <select name="taskPriority" class="width-80" ng-model="conf_priority"
                        ng-options="priority.ID as priority.Text for priority in priorityOptions">
                </select>
            </div>
        </div>

        <div class="col-xs-12 form-group">
            <label class="col-sm-1 control-label padding0 textRight">失败重跑</label>

            <div class="col-sm-3">
                <select name="recall" class="width-80" ng-model="conf_ifRecall"
                        ng-options="ifRecall.ID as ifRecall.Text for ifRecall in ifRecallOptions"></select>
                </select>
            </div>

            <label class="col-sm-1 control-label padding0 textRight">重跑次数上限</label>

            <div class="col-sm-3">
                <select name="recallLimit" class="width-80" ng-model="conf_recallLimit"
                        ng-options="recallLimit for recallLimit in recallLimitOptions">
                </select>
            </div>

            <label class="col-sm-1 control-label padding0 textRight">失败重跑间隔</label>

            <div class="col-sm-3">
                <select name="recallInterval" class="width-80" ng-model="conf_recallInterval"
                        ng-options="recallInterval.ID as recallInterval.Text for recallInterval in recallIntervalOptions"></select>
                </select>
            </div>
        </div>

        <div class="col-xs-12 form-group">

            <label class="col-sm-1 control-label padding0 textRight">成功返回值</label>

            <div class="col-sm-3">
                <input type="text" class="width-80" ng-model="conf_successCode" ng-trim="true">
                <strong>*</strong>
            </div>

            <label class="col-sm-1 control-label padding0 textRight">等待返回码</label>

            <div class="col-sm-3">
                <input type="text" class="width-80" ng-model="conf_waitCode" ng-trim="true">
            </div>

            <label class="col-sm-1 control-label padding0 textRight">偏移量</label>

            <div class="col-sm-3">
                <select class="width-80" name="taskPeriod" ng-model="conf_offset"
                        ng-options="offset for offset in offsetOptions">
                </select>
                <!--<span class="help-button" tooltip-placement="top"-->
                      <!--tooltip="D：天级偏移，M：月级偏移，字母后的数字表示具体的偏移值，D0：不偏移，D1：向前偏移一天，M2：向前偏移两月">?</span>-->
            </div>

        </div>

        <div class="col-xs-12 form-group">

            <label class="col-sm-1 control-label padding0 textRight"
                    >超时时间</label>

            <div class="col-sm-3">
                <select class="width-80" name="taskTimeout" ng-model="conf_timeout"
                        ng-options="timeout.ID as timeout.Text for timeout in timeoutOptions" required>
                </select>
                <!--<span class="help-button" tooltip-placement="top"-->
                      <!--tooltip="当任务执行时间超过指定时间后，调度置其状态为timeout">?</span>-->
            </div>

            <label class="col-sm-1 control-label padding0 textRight">执行命令</label>

            <div class="col-sm-7">
                <input type="text" class="width-95" ng-model="conf_para1" ng-trim="true">
                <strong>*</strong>
                <!--<textarea type="text" rows=5 class="width-90" name="freq" ng-model="command">-->
                <!--</textarea>-->
            </div>
        </div>
    </div>
    <div class="alert alert-danger col-xs-12" ng-show="showCfgMsg">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>
        <strong>{{cfgMsg}}</strong>
    </div>

    <div class="col-xs-12 text-center" ng-show="Loading">
        <div class="loading" style="color: #000000;width: auto">{{LoadingMsg}}</div>
    </div>

    <div class="col-xs-12" style="padding-bottom: 20px">
        <div class="col-xs-12 width-100">
            <div class="table-header">前驱依赖</div>
            <div class="table-responsive">
                <div class="dataTables_wrapper" role="grid">
                    <table class="table table-striped table-bordered table-hover dataTable">
                        <thead>
                        <tr role="row">
                            <th>任务ID</th>
                            <th>任务名称</th>
                            <th>任务周期</th>
                            <th>偏移量</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="dependenceTask in dependenceTasks">
                            <td>{{dependenceTask.taskId}}</td>
                            <td>{{dependenceTask.taskName}}</td>
                            <!--<td>{{dependenceTask.cycle}}</td>-->
                            <!--<td>{{dependenceTask.cycleGap}}</td>-->
                            <td>
                                <span class="label {{getExecutionCycleLabel(dependenceTask.cycle)}}">
                                    {{getCycleText(dependenceTask.cycle)}}
                                </span>
                            </td>
                            <td>
                                <select class="width-80"  ng-model="dependenceTasks[$index].offset"
                                        ng-options="offset for offset in {{getOffsetOptions(dependenceTask.cycle)}}">
                                </select>
                            </td>
                            <!--<td>-->
                            <!--<span class="label {{getExecutionCycleLabel(dependenceTask.cycle)}}">{{getCycleText(dependenceTask.cycle)}}-->
                            <!--</span>-->
                            <!--</td>-->
                            <!--<td>-->
                            <!--<select class="width-80" name="taskPeriod" ng-model="dependenceTasks[$index].cycleGap"-->
                            <!--ng-options="offset for offset in {{getOffsetOptions(dependenceTask.cycle)}}"></select>-->
                            <!--</select>-->
                            <!--</td>-->
                            <td>
                                <button class="btn-link ng-scope"
                                        ng-click="deleteDependenceTask($index)"
                                        tooltip-placement="top" tooltip="删除依赖">
                                    <i class="icon-remove bigger-150"></i>
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="row" id="addDependencyButton">
                        <button class="btn-link ng-scope" ng-click="showDependenceDialog()"
                                tooltip-placement="top"
                                tooltip="添加依赖">
                            <i class="icon-plus bigger-180"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="alert alert-success col-xs-12" ng-show="showSaveSucess">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>
        <strong>{{saveSuccessMsg}}</strong>
    </div>

    <p class=" text-right">
            <button class="btn btn-success col-xs-1 " style="float: right;margin: 10px" ng-hide="Loading" ng-click="updateTaskCfg()">保存修改</button>
    </p>



</form>

